<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AIfES 2: aiopti_adam.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="AIfES_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AIfES 2
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('aiopti__adam_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">aiopti_adam.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="aiopti__adam_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"><a class="line" href="aiopti__adam_8h.html#a40c00ead1bde1b1ac8c46282b0de8804">    1</a></span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#ifndef AIOPTI_ADAM</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#define AIOPTI_ADAM</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160; </div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="aifes__core_8h.html">core/aifes_core.h</a>&quot;</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structaiopti__adam.html">aiopti_adam</a>              <a class="code" href="structaiopti__adam.html">aiopti_adam_t</a>; </div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structaiopti__adam__momentums.html">aiopti_adam_momentums</a>    <a class="code" href="structaiopti__adam__momentums.html">aiopti_adam_momentums_t</a>; </div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structaiopti__adam.html">   56</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structaiopti__adam.html">aiopti_adam</a> {</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a76e9fa4cf381a685a5df819a57737e64">   57</a></span>&#160;    <a class="code" href="structaiopti.html">aiopti_t</a> <a class="code" href="structaiopti__adam.html#a76e9fa4cf381a685a5df819a57737e64">base</a>; </div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#afe398d9948a5b913323c75e15d752a21">   65</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structaiopti__adam.html#afe398d9948a5b913323c75e15d752a21">beta1</a>; </div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a929c5cadde02d656d5a6c16c3a225a9f">   66</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structaiopti__adam.html#a929c5cadde02d656d5a6c16c3a225a9f">beta2</a>; </div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a642324fdce94ffd7d353846649fd5c3f">   67</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structaiopti__adam.html#a642324fdce94ffd7d353846649fd5c3f">eps</a>; </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a776f34e8b0d6f0a734f7bd69911f8115">   75</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structaiopti__adam.html#a776f34e8b0d6f0a734f7bd69911f8115">beta1t</a>; </div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a8969b6b3c91318044af66d9829fcc981">   76</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structaiopti__adam.html#a8969b6b3c91318044af66d9829fcc981">beta2t</a>; </div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a508e23c3b1a359c4dc09fd4aca55b5be">   77</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structaiopti__adam.html#a508e23c3b1a359c4dc09fd4aca55b5be">one_minus_beta1</a>; </div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a6a78981ba0fc6b6c94018fbbf550eeae">   78</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structaiopti__adam.html#a6a78981ba0fc6b6c94018fbbf550eeae">one_minus_beta2</a>; </div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a8cd9a549bb8e806d57dfc672574fde8f">   79</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structaiopti__adam.html#a8cd9a549bb8e806d57dfc672574fde8f">lrt</a>; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160; </div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a50f5e44b0fca9c1e79a5287adb4a59eb">   94</a></span>&#160;    void (*<a class="code" href="structaiopti__adam.html#a50f5e44b0fca9c1e79a5287adb4a59eb">multiply</a>)(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *b, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a5c1478e75fa8c703a1ed25b1091a6bc4">  103</a></span>&#160;    void (*<a class="code" href="structaiopti__adam.html#a5c1478e75fa8c703a1ed25b1091a6bc4">divide</a>)(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *b, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160; </div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a7674445f16490c6cacdb03157feab8c7">  112</a></span>&#160;    void (*<a class="code" href="structaiopti__adam.html#a7674445f16490c6cacdb03157feab8c7">tensor_add</a>)(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *b, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160; </div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a5f5b55cad6c306233a8e4510d1773244">  121</a></span>&#160;    void (*<a class="code" href="structaiopti__adam.html#a5f5b55cad6c306233a8e4510d1773244">tensor_sub</a>)(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *b, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a2cbbfaac40611a8dd0ec908cc199b388">  130</a></span>&#160;    void (*<a class="code" href="structaiopti__adam.html#a2cbbfaac40611a8dd0ec908cc199b388">scalar_mul</a>)(<span class="keyword">const</span> <span class="keywordtype">void</span> *scalar, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a5aaf0a1aa2e5c1674e5b4be2f80f907f">  139</a></span>&#160;    void (*<a class="code" href="structaiopti__adam.html#a5aaf0a1aa2e5c1674e5b4be2f80f907f">scalar_add</a>)(<span class="keyword">const</span> <span class="keywordtype">void</span> *scalar, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160; </div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#a5d36deab4e71dd3b8d45ea2fff8f4b55">  148</a></span>&#160;    void (*<a class="code" href="structaiopti__adam.html#a5d36deab4e71dd3b8d45ea2fff8f4b55">sqrt</a>)(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *x, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160; </div>
<div class="line"><a name="l00157"></a><span class="lineno"><a class="line" href="structaiopti__adam.html#aa0c5520df9a1bfa236b1ef7eddeb3553">  157</a></span>&#160;    void (*<a class="code" href="structaiopti__adam.html#aa0c5520df9a1bfa236b1ef7eddeb3553">zero_tensor</a>)(<a class="code" href="structaitensor.html">aitensor_t</a> *tensor);</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160; </div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;};</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160; </div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="structaicore__optitype.html">aicore_optitype_t</a> *<a class="code" href="aiopti__adam_8h.html#af4b770ca8b7c46a865a01dedd0c866af">aiopti_adam_type</a>;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160; </div>
<div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="structaiopti__adam__momentums.html">  174</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structaiopti__adam__momentums.html">aiopti_adam_momentums</a> {</div>
<div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="structaiopti__adam__momentums.html#ac8a952596756d8af1ce2a52ee44b6d2b">  175</a></span>&#160;    <a class="code" href="structaitensor.html">aitensor_t</a> <a class="code" href="structaiopti__adam__momentums.html#ac8a952596756d8af1ce2a52ee44b6d2b">m</a>; </div>
<div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="structaiopti__adam__momentums.html#a018a8a9b15ab10dd50e0ded5cd5bfdda">  176</a></span>&#160;    <a class="code" href="structaitensor.html">aitensor_t</a> <a class="code" href="structaiopti__adam__momentums.html#a018a8a9b15ab10dd50e0ded5cd5bfdda">v</a>; </div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;};</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160; </div>
<div class="line"><a name="l00188"></a><span class="lineno"><a class="line" href="aiopti__adam_8h.html#af629e0de34a263c34060368bb8e7d6d0">  188</a></span>&#160;<a class="code" href="structaiopti.html">aiopti_t</a> *<a class="code" href="aiopti__adam_8h.html#af629e0de34a263c34060368bb8e7d6d0">aiopti_adam</a>(<a class="code" href="structaiopti__adam.html">aiopti_adam_t</a> *opti);</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160; </div>
<div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="aiopti__adam_8h.html#a79d431f3d4b7d1d0a78d720f297abc30">  202</a></span>&#160;uint32_t <a class="code" href="aiopti__adam_8h.html#a79d431f3d4b7d1d0a78d720f297abc30">aiopti_adam_sizeof_optimem</a>(<a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *params);</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160; </div>
<div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="aiopti__adam_8h.html#a5fa06ea548cdaa249a98f5e9aaf0fc53">  224</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aiopti__adam_8h.html#a5fa06ea548cdaa249a98f5e9aaf0fc53">aiopti_adam_init_optimem</a>(<a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *params, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *gradients, <span class="keywordtype">void</span> *optimem);</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160; </div>
<div class="line"><a name="l00240"></a><span class="lineno"><a class="line" href="aiopti__adam_8h.html#a735b282e282209a39b101cd8f04cf43d">  240</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aiopti__adam_8h.html#a735b282e282209a39b101cd8f04cf43d">aiopti_adam_zero_gradients</a>(<a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>, <a class="code" href="structaitensor.html">aitensor_t</a> *gradients);</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160; </div>
<div class="line"><a name="l00280"></a><span class="lineno"><a class="line" href="aiopti__adam_8h.html#a4b9e08fa3872a6edcf3dbfb81c53f641">  280</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aiopti__adam_8h.html#a4b9e08fa3872a6edcf3dbfb81c53f641">aiopti_adam_update_params</a>(<a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>, <a class="code" href="structaitensor.html">aitensor_t</a> *params, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *gradients, <span class="keywordtype">void</span> *optimem);</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160; </div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;<span class="preprocessor">#ifdef AIDEBUG_PRINT_MODULE_SPECS</span></div>
<div class="line"><a name="l00287"></a><span class="lineno"><a class="line" href="aiopti__adam_8h.html#a916f8f38aaeba5814db961c3ff00a3d4">  287</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aiopti__adam_8h.html#a916f8f38aaeba5814db961c3ff00a3d4">aiopti_adam_print_specs</a>(<span class="keyword">const</span> <a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>);</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// AIDEBUG_PRINT_MODULE_SPECS</span></div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// AIOPTI_ADAM</span></div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160; </div>
<div class="ttc" id="aaifes__core_8h_html"><div class="ttname"><a href="aifes__core_8h.html">aifes_core.h</a></div><div class="ttdoc">AIfES 2 core interface.</div></div>
<div class="ttc" id="aaiopti__adam_8h_html_a4b9e08fa3872a6edcf3dbfb81c53f641"><div class="ttname"><a href="aiopti__adam_8h.html#a4b9e08fa3872a6edcf3dbfb81c53f641">aiopti_adam_update_params</a></div><div class="ttdeci">void aiopti_adam_update_params(aiopti_t *self, aitensor_t *params, const aitensor_t *gradients, void *optimem)</div><div class="ttdoc">Update the given parameter tensor with respect to the gradients.</div></div>
<div class="ttc" id="aaiopti__adam_8h_html_a5fa06ea548cdaa249a98f5e9aaf0fc53"><div class="ttname"><a href="aiopti__adam_8h.html#a5fa06ea548cdaa249a98f5e9aaf0fc53">aiopti_adam_init_optimem</a></div><div class="ttdeci">void aiopti_adam_init_optimem(aiopti_t *self, const aitensor_t *params, const aitensor_t *gradients, void *optimem)</div><div class="ttdoc">Initialization of the optimization memory buffer.</div></div>
<div class="ttc" id="aaiopti__adam_8h_html_a735b282e282209a39b101cd8f04cf43d"><div class="ttname"><a href="aiopti__adam_8h.html#a735b282e282209a39b101cd8f04cf43d">aiopti_adam_zero_gradients</a></div><div class="ttdeci">void aiopti_adam_zero_gradients(aiopti_t *self, aitensor_t *gradients)</div><div class="ttdoc">Set the gradients to zero.</div></div>
<div class="ttc" id="aaiopti__adam_8h_html_a79d431f3d4b7d1d0a78d720f297abc30"><div class="ttname"><a href="aiopti__adam_8h.html#a79d431f3d4b7d1d0a78d720f297abc30">aiopti_adam_sizeof_optimem</a></div><div class="ttdeci">uint32_t aiopti_adam_sizeof_optimem(aiopti_t *self, const aitensor_t *params)</div><div class="ttdoc">Calculates the required memory for the optimization step.</div></div>
<div class="ttc" id="aaiopti__adam_8h_html_a916f8f38aaeba5814db961c3ff00a3d4"><div class="ttname"><a href="aiopti__adam_8h.html#a916f8f38aaeba5814db961c3ff00a3d4">aiopti_adam_print_specs</a></div><div class="ttdeci">void aiopti_adam_print_specs(const aiopti_t *self)</div><div class="ttdoc">Print the optimizer specification.</div></div>
<div class="ttc" id="aaiopti__adam_8h_html_af4b770ca8b7c46a865a01dedd0c866af"><div class="ttname"><a href="aiopti__adam_8h.html#af4b770ca8b7c46a865a01dedd0c866af">aiopti_adam_type</a></div><div class="ttdeci">const aicore_optitype_t * aiopti_adam_type</div><div class="ttdoc">Adam optimizer type.</div></div>
<div class="ttc" id="aaiopti__adam_8h_html_af629e0de34a263c34060368bb8e7d6d0"><div class="ttname"><a href="aiopti__adam_8h.html#af629e0de34a263c34060368bb8e7d6d0">aiopti_adam</a></div><div class="ttdeci">aiopti_t * aiopti_adam(aiopti_adam_t *opti)</div><div class="ttdoc">Initialize the given Adam optimizer.</div></div>
<div class="ttc" id="astructaicore__optitype_html"><div class="ttname"><a href="structaicore__optitype.html">aicore_optitype</a></div><div class="ttdoc">Type indicator of the optimizer to check for the optimizer type.</div><div class="ttdef"><b>Definition:</b> aifes_core.h:160</div></div>
<div class="ttc" id="astructaiopti__adam__momentums_html"><div class="ttname"><a href="structaiopti__adam__momentums.html">aiopti_adam_momentums</a></div><div class="ttdoc">Struct for the momentum tensors of an Adam optimizer.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:174</div></div>
<div class="ttc" id="astructaiopti__adam__momentums_html_a018a8a9b15ab10dd50e0ded5cd5bfdda"><div class="ttname"><a href="structaiopti__adam__momentums.html#a018a8a9b15ab10dd50e0ded5cd5bfdda">aiopti_adam_momentums::v</a></div><div class="ttdeci">aitensor_t v</div><div class="ttdoc">Second momentum vector.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:176</div></div>
<div class="ttc" id="astructaiopti__adam__momentums_html_ac8a952596756d8af1ce2a52ee44b6d2b"><div class="ttname"><a href="structaiopti__adam__momentums.html#ac8a952596756d8af1ce2a52ee44b6d2b">aiopti_adam_momentums::m</a></div><div class="ttdeci">aitensor_t m</div><div class="ttdoc">First momentum vector.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:175</div></div>
<div class="ttc" id="astructaiopti__adam_html"><div class="ttname"><a href="structaiopti__adam.html">aiopti_adam</a></div><div class="ttdoc">General Adam optimizer  struct.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:56</div></div>
<div class="ttc" id="astructaiopti__adam_html_a2cbbfaac40611a8dd0ec908cc199b388"><div class="ttname"><a href="structaiopti__adam.html#a2cbbfaac40611a8dd0ec908cc199b388">aiopti_adam::scalar_mul</a></div><div class="ttdeci">void(* scalar_mul)(const void *scalar, const aitensor_t *a, aitensor_t *result)</div><div class="ttdoc">Required math function: Multiplication of a scalar with a tensor.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:130</div></div>
<div class="ttc" id="astructaiopti__adam_html_a508e23c3b1a359c4dc09fd4aca55b5be"><div class="ttname"><a href="structaiopti__adam.html#a508e23c3b1a359c4dc09fd4aca55b5be">aiopti_adam::one_minus_beta1</a></div><div class="ttdeci">void * one_minus_beta1</div><div class="ttdoc">aiscalar: Auxiliary variable to calculate</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:77</div></div>
<div class="ttc" id="astructaiopti__adam_html_a50f5e44b0fca9c1e79a5287adb4a59eb"><div class="ttname"><a href="structaiopti__adam.html#a50f5e44b0fca9c1e79a5287adb4a59eb">aiopti_adam::multiply</a></div><div class="ttdeci">void(* multiply)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)</div><div class="ttdoc">Required math function: Element wise tensor multiplication.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:94</div></div>
<div class="ttc" id="astructaiopti__adam_html_a5aaf0a1aa2e5c1674e5b4be2f80f907f"><div class="ttname"><a href="structaiopti__adam.html#a5aaf0a1aa2e5c1674e5b4be2f80f907f">aiopti_adam::scalar_add</a></div><div class="ttdeci">void(* scalar_add)(const void *scalar, const aitensor_t *a, aitensor_t *result)</div><div class="ttdoc">Required math function: Element wise addition of a scalar to a tensor.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:139</div></div>
<div class="ttc" id="astructaiopti__adam_html_a5c1478e75fa8c703a1ed25b1091a6bc4"><div class="ttname"><a href="structaiopti__adam.html#a5c1478e75fa8c703a1ed25b1091a6bc4">aiopti_adam::divide</a></div><div class="ttdeci">void(* divide)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)</div><div class="ttdoc">Required math function: Element wise tensor dividation.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:103</div></div>
<div class="ttc" id="astructaiopti__adam_html_a5d36deab4e71dd3b8d45ea2fff8f4b55"><div class="ttname"><a href="structaiopti__adam.html#a5d36deab4e71dd3b8d45ea2fff8f4b55">aiopti_adam::sqrt</a></div><div class="ttdeci">void(* sqrt)(const aitensor_t *x, aitensor_t *result)</div><div class="ttdoc">Required math function: Square root.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:148</div></div>
<div class="ttc" id="astructaiopti__adam_html_a5f5b55cad6c306233a8e4510d1773244"><div class="ttname"><a href="structaiopti__adam.html#a5f5b55cad6c306233a8e4510d1773244">aiopti_adam::tensor_sub</a></div><div class="ttdeci">void(* tensor_sub)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)</div><div class="ttdoc">Required math function: Element wise tensor subtraction.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:121</div></div>
<div class="ttc" id="astructaiopti__adam_html_a642324fdce94ffd7d353846649fd5c3f"><div class="ttname"><a href="structaiopti__adam.html#a642324fdce94ffd7d353846649fd5c3f">aiopti_adam::eps</a></div><div class="ttdeci">void * eps</div><div class="ttdoc">aiscalar: Small positive number for numerical stability  (avoid dividing by 0)</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:67</div></div>
<div class="ttc" id="astructaiopti__adam_html_a6a78981ba0fc6b6c94018fbbf550eeae"><div class="ttname"><a href="structaiopti__adam.html#a6a78981ba0fc6b6c94018fbbf550eeae">aiopti_adam::one_minus_beta2</a></div><div class="ttdeci">void * one_minus_beta2</div><div class="ttdoc">aiscalar: Auxiliary variable to calculate</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:78</div></div>
<div class="ttc" id="astructaiopti__adam_html_a7674445f16490c6cacdb03157feab8c7"><div class="ttname"><a href="structaiopti__adam.html#a7674445f16490c6cacdb03157feab8c7">aiopti_adam::tensor_add</a></div><div class="ttdeci">void(* tensor_add)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)</div><div class="ttdoc">Required math function: Element wise tensor addition.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:112</div></div>
<div class="ttc" id="astructaiopti__adam_html_a76e9fa4cf381a685a5df819a57737e64"><div class="ttname"><a href="structaiopti__adam.html#a76e9fa4cf381a685a5df819a57737e64">aiopti_adam::base</a></div><div class="ttdeci">aiopti_t base</div><div class="ttdoc">Inherited field members from general optimizer struct.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:57</div></div>
<div class="ttc" id="astructaiopti__adam_html_a776f34e8b0d6f0a734f7bd69911f8115"><div class="ttname"><a href="structaiopti__adam.html#a776f34e8b0d6f0a734f7bd69911f8115">aiopti_adam::beta1t</a></div><div class="ttdeci">void * beta1t</div><div class="ttdoc">aiscalar: Auxiliary variable to calculate</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:75</div></div>
<div class="ttc" id="astructaiopti__adam_html_a8969b6b3c91318044af66d9829fcc981"><div class="ttname"><a href="structaiopti__adam.html#a8969b6b3c91318044af66d9829fcc981">aiopti_adam::beta2t</a></div><div class="ttdeci">void * beta2t</div><div class="ttdoc">aiscalar: Auxiliary variable to calculate</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:76</div></div>
<div class="ttc" id="astructaiopti__adam_html_a8cd9a549bb8e806d57dfc672574fde8f"><div class="ttname"><a href="structaiopti__adam.html#a8cd9a549bb8e806d57dfc672574fde8f">aiopti_adam::lrt</a></div><div class="ttdeci">void * lrt</div><div class="ttdoc">aiscalar: Auxiliary variable to calculate</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:79</div></div>
<div class="ttc" id="astructaiopti__adam_html_a929c5cadde02d656d5a6c16c3a225a9f"><div class="ttname"><a href="structaiopti__adam.html#a929c5cadde02d656d5a6c16c3a225a9f">aiopti_adam::beta2</a></div><div class="ttdeci">void * beta2</div><div class="ttdoc">aiscalar: Exponential decay rate for the second moment estimates</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:66</div></div>
<div class="ttc" id="astructaiopti__adam_html_aa0c5520df9a1bfa236b1ef7eddeb3553"><div class="ttname"><a href="structaiopti__adam.html#aa0c5520df9a1bfa236b1ef7eddeb3553">aiopti_adam::zero_tensor</a></div><div class="ttdeci">void(* zero_tensor)(aitensor_t *tensor)</div><div class="ttdoc">Required math function: Sets the elements of a tensor to zero.</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:157</div></div>
<div class="ttc" id="astructaiopti__adam_html_afe398d9948a5b913323c75e15d752a21"><div class="ttname"><a href="structaiopti__adam.html#afe398d9948a5b913323c75e15d752a21">aiopti_adam::beta1</a></div><div class="ttdeci">void * beta1</div><div class="ttdoc">aiscalar: Exponential decay rate for the first moment estimates</div><div class="ttdef"><b>Definition:</b> aiopti_adam.h:65</div></div>
<div class="ttc" id="astructaiopti_html"><div class="ttname"><a href="structaiopti.html">aiopti</a></div><div class="ttdoc">AIfES optimizer interface.</div><div class="ttdef"><b>Definition:</b> aifes_core.h:438</div></div>
<div class="ttc" id="astructaitensor_html"><div class="ttname"><a href="structaitensor.html">aitensor</a></div><div class="ttdoc">A tensor in AIfES.</div><div class="ttdef"><b>Definition:</b> aifes_math.h:89</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1e5d3661ed79af157d57e64a38265d09.html">basic</a></li><li class="navelem"><a class="el" href="dir_90008ee2b0f86999412b56217da88d54.html">base</a></li><li class="navelem"><a class="el" href="dir_a6118b80a1160589fd2e088758244a4b.html">aiopti</a></li><li class="navelem"><a class="el" href="aiopti__adam_8h.html">aiopti_adam.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
